﻿using System;
using RpcClient.Attr;

namespace RpcClient.Model
{
    public class IocBody
    {
        internal IocBody(Type form, Type to, string name)
        {
            this.Form = form;
            this.To = to;
            this.Name = name;
        }
        internal IocBody(Type form, Type to, string name, ClassLifetimeType lifetimeType)
        {
            this.LifetimeType = lifetimeType;
            this.Form = form;
            this.To = to;
            this.Name = name;
        }
        internal IocBody(Type form, Type to)
        {
            this.Form = form;
            this.To = to;
        }
        internal IocBody(Type form, Type to, ClassLifetimeType lifetimeType)
        {
            this.LifetimeType = lifetimeType;
            this.Form = form;
            this.To = to;
        }
        public ClassLifetimeType? LifetimeType
        {
            get;
        }
        public Type Form
        {
            get;
        }
        public Type To
        {
            get;
        }
        public string Name
        {
            get;
            set;
        }
    }
}
